package com.neu.wms.mapper;


import com.neu.wms.dto.UserDto;
import com.neu.wms.vo.MenuVo;
import com.neu.wms.vo.UserVo;
import com.neu.wms.entity.SysUser;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
* @author 冯Sir
* @description 针对表【sys_user(用户信息表)】的数据库操作Mapper
* @createDate 2023-06-20 10:10:17
* @Entity com.neu.wms.entity.SysUser
*/
@Mapper
public interface SysUserMapper {



    /**
     * 根据用户名查询用户角色
     * @param userName 用户名
     * @return 用户角色role_code
     */
    String[] selectRoleByUsername(String userName);

    /**
     * 根据用户名查询用户权限
     * @param userName 用户名
     * @return 用户权限permission_code
     */
    String[] selectPermissionByName(String userName);
    List<MenuVo> selectMenuByName(String userName,Integer parentId);
    SysUser selectByUsername(String userName);

    List<UserVo> selectAll(UserDto userDto);

    SysUser selectByNameAndPwd(UserDto user);

    int deleteByPrimaryKey(Long id);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    SysUser selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);

}
